<template>
	<view>
		<view class="block_1">
			<view class="item_t">
				<view class="imgs">
					<image src="/static/bj.png" mode=""></image>
				</view>
				<view class="i_r">
					<view class="tit">{{Info.customerName}}</view>
					<view class="order">{{Info.customerAddress}}</view>
				</view>
			</view>
			<view class="it_flex">
				<view class="its" style="color: #3D81FF;" @click="$callPhone(Info.customerPhone)">
					<image src="/static/q1.png" mode=""></image>
					{{Info.customerPhone}}
				</view>
				<view class="x"></view>
				<view class="its" @click="$clipCz(Info.customerFax)">
					<image src="/static/q2.png" mode=""></image>
					{{Info.customerFax}}
				</view>
			</view>
			<view class="ulsi">
				<view class="item">
					<view class="t">合同单号：</view>
					<view class="r">
						{{Info.contractNumber}}
					</view>
				</view>
				<view class="item">
					<view class="t">合同金额：</view>
					<view class="r r1">
						￥{{Info.contractAmount|numberToCurrencyNo}}
						<span v-if="Info.includeTax == '是'">（含税）</span>
						<span v-else>（不含税）</span>
					</view>
				</view>
				<view class="item">
					<view class="t">付款计划：</view>
					<view class="r">
						{{Info.payPlan}}
					</view>
				</view>
				<view class="item">
					<view class="t">产品附件：</view>
					<view class="r">
						{{Info.remark}}
					</view>
				</view>
				<view class="item">
					<view class="t">创建时间：</view>
					<view class="r">
						{{Info.createTime}}
					</view>
				</view>
				<view class="item">
					<view class="t">更新时间：</view>
					<view class="r">
						{{Info.updateTime}}
					</view>
				</view>
				<view class="item">
					<view class="t">签订日期：</view>
					<view class="r">
						{{Info.signDate}}
					</view>
				</view>
				<view class="item">
					<view class="t">签订地点：</view>
					<view class="r">
						{{Info.signAddress}}
					</view>
				</view>
				<view class="item">
					<view class="t">产品交期：</view>
					<view class="r">
						{{Info.deliveryTime}}
					</view>
				</view>
			</view>
		</view>
		<view class="btn" @click="goinfo">
			查看报价信息>>
		</view>
	</view>
</template>

<script>
	import {
		contractInfo
	} from '@/common/http.api.js';
	export default {
		data() {
			return {
				Info:{},
				id:''
			};
		},
		onLoad(option) {
			this.id = option.id
			contractInfo({id:option.id}).then(res=>{
				console.log(res);
				this.Info = res.data
			})
		},
		methods: {
			goinfo() {
				uni.navigateTo({
					url: `/pages/index/info?id=${this.id}&&orderId=${this.Info.orderId}`
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #F7F8FA;
	}

	.block_1 {
		width: 710rpx;
		background: #FFFFFF;
		margin: 20rpx auto;
		border-radius: 20rpx 20rpx 20rpx 20rpx;
		padding: 40rpx 30rpx 10rpx 30rpx;
		box-sizing: border-box;

		.item_t {
			display: flex;

			.imgs {
				width: 100rpx;
				height: 100rpx;
				background: #5F79FB;
				border-radius: 50rpx;
				display: flex;
				justify-content: center;
				align-items: center;

				image {
					width: 52rpx;
					height: 52rpx;
					display: block;
				}
			}

			.i_r {
				margin-left: 20rpx;

				.tit {
					font-family: PingFang SC, PingFang SC;
					font-weight: bold;
					font-size: 32rpx;
					color: #000000;
				}

				.order {
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 26rpx;
					color: #000000;
					margin-top: 10rpx;
				}
			}

		}

		.it_flex {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 0rpx 40rpx;
			margin-top: 28rpx;
			padding-bottom: 26rpx;
			border-bottom: 1px solid #DADADA;

			.its {
				display: flex;
				align-items: center;

				image {
					width: 30rpx;
					height: 30rpx;
					margin-right: 14rpx;
				}

				font-family: PingFang SC,
				PingFang SC;
				font-weight: 500;
				font-size: 30rpx;
				color: #979797;
			}

			.x {
				width: 2rpx;
				height: 30rpx;
				background-color: #D1D1D6;
			}
		}

		.ulsi {
			.item {
				margin: 24rpx auto;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 30rpx;
				color: #000;
				display: flex;
				align-items: center;

				.t {
					color: #979797;
					width: 150rpx;
				}

				.r {
					flex: 1;
				}

				.r1 {
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 40rpx;
					color: #F67220;
				}

				span {
					font-size: 24rpx;
					color: #000;
				}
			}
		}
	}

	.btn {
		width: 710rpx;
		height: 100rpx;
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 20rpx 20rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #3D81FF;
		line-height: 100rpx;
		margin: 20rpx auto;
		text-align: center;
	}
</style>